<script language="javascript" src="/js/script.js"></script>
<?php
require_once 'extra/fckeditor/fckeditor.php'; 
class AML_View_Helper_EditorFck extends Zend_Controller_Action_Helper_Abstract
{
    public function editorFck($name = null, $value = null, $width, $height)
    {        
		if(is_null($name) && is_null($value) && is_null($attribs)) { 
            return $this; 
        } 
         
        //$info = $this->_getInfo($name, $value, $attribs); 
        //extract($info); // name, value, attribs, options, listsep, disable 
		
        $editor = new FCKeditor($name); 
        // set variables
        $editor->BasePath   = 'http://'.$_SERVER['HTTP_HOST'] .'/extra/fckeditor/' ; 
        $editor->ToolbarSet = empty($attribs['ToolbarSet']) ? 'Basic' : $attribs['ToolbarSet']; 
        //$editor->Width      = empty($attribs['Width']) ? '95%' : $attribs['Width']; 
        //$editor->Height     = empty($attribs['Height']) ? 250 : $attribs['Height']; 
        
        $editor->Width      = empty($width) ? '95%' : $width; 
        $editor->Height     = empty($height) ? 250 : $height; 
        $editor->Value      = $value;
        /*if(is_null($value))
		{
			$editor->Value = "_____";
		} else {
			$editor->Value = $value;	
		}*/
         
        // set Config  
        $editor->Config['BaseHref'] = $editor->BasePath;
        $editor->Config['CustomConfigurationsPath'] = $editor->BasePath.'editor/fckconfig.js'; 
        $editor->Config['SkinPath'] = $editor->BasePath.'editor/skins/silver/';         
        return $editor->createHtml();         
    }
}
?>